package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserLogoutDao;
import com.kly.user.db.entity.UserLogoutEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;

/**
* User: user
* Date: 2023-11-22
* Time: 16:10:16.302
*/

@Repository
public class UserLogoutDaoImpl extends AbstractBaseMapper<UserLogoutEntity> implements UserLogoutDao {

    @Override
    public Integer getRecordByUserCode(String userCode) {
        final HashMap<String, Object> params = Maps.newHashMap();
        params.put("userCode", userCode);
        return (Integer) getSqlSession().selectOne(this.getStatement("getRecordByUserCode"), params);
    }

    @Override
    public Integer deleteByUserCode(String userCode) {
        final HashMap<String, Object> params = Maps.newHashMap();
        params.put("userCode", userCode);
        return getSqlSession().delete(this.getStatement("deleteByUserCode"), params);
    }

}